package org.dolphin.base.bean;

import java.io.Serializable;
import org.springframework.util.ObjectUtils;

public class FlatCustomerVO implements Serializable {
  private static final long serialVersionUID = -3309127670143077973L;
  private Long id;
  private Long version;
  private String alias;
  private String firstname;
  private String lastname;
  private String city;

  @Override
  public boolean equals(Object obj) {
    if (obj == this) {
      return true;
    } else if (obj instanceof FlatCustomerVO) {
      FlatCustomerVO oth = (FlatCustomerVO) obj;
      return ObjectUtils.nullSafeEquals(getId(), oth.getId());
    }
    return false;
  }

  public String getAlias() {
    return alias;
  }

  public String getCity() {
    return city;
  }

  public String getFirstname() {
    return firstname;
  }

  public Long getId() {
    return id;
  }

  public String getLastname() {
    return lastname;
  }

  public Long getVersion() {
    return version;
  }

  @Override
  public int hashCode() {
    int hash = ObjectUtils.nullSafeHashCode(getId());
    return hash;
  }

  public void setAlias(String alias) {
    this.alias = alias;
  }

  public void setCity(String city) {
    this.city = city;
  }

  public void setFirstname(String firstname) {
    this.firstname = firstname;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public void setLastname(String lastname) {
    this.lastname = lastname;
  }

  public void setVersion(Long version) {
    this.version = version;
  }
}
